home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_libgtop.idb / usr / freeware / include / glibtop / sysinfo.h.z / sysinfo.h
Encoding:
C/C++ Source or Header  |  1999-07-16  |  1.6 KB  |  65 lines

  1. /* $Id: sysinfo.h,v 1.5 1999/02/23 11:43:21 martin Exp $ */
  2.  
  3. /* Copyright (C) 1998-99 Martin Baulig
  4.    This file is part of LibGTop 1.0.
  5.  
  6.    Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
  7.  
  8.    LibGTop is free software; you can redistribute it and/or modify it
  9.    under the terms of the GNU General Public License as published by
  10.    the Free Software Foundation; either version 2 of the License,
  11.    or (at your option) any later version.
  12.  
  13.    LibGTop is distributed in the hope that it will be useful, but WITHOUT
  14.    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  15.    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  16.    for more details.
  17.  
  18.    You should have received a copy of the GNU General Public License
  19.    along with LibGTop; see the file COPYING. If not, write to the
  20.    Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  21.    Boston, MA 02111-1307, USA.
  22. */
  23.  
  24. #ifndef __GLIBTOP_SYSINFO_H__
  25. #define __GLIBTOP_SYSINFO_H__
  26.  
  27. #include <glibtop.h>
  28. #include <glibtop/cpu.h>
  29. #include <glibtop/global.h>
  30.  
  31. #include <glib.h>
  32.  
  33. BEGIN_LIBGTOP_DECLS
  34.  
  35. #define GLIBTOP_SYSINFO_CPUINFO        0
  36.  
  37. #define GLIBTOP_MAX_SYSINFO        1
  38.  
  39. typedef struct _glibtop_sysinfo    glibtop_sysinfo;
  40.  
  41. typedef struct _glibtop_entry    glibtop_entry;
  42.  
  43. struct _glibtop_entry
  44. {
  45.     GPtrArray    *labels;
  46.     GHashTable    *values;
  47.     GHashTable    *descriptions;
  48. };
  49.  
  50. struct _glibtop_sysinfo
  51. {
  52.     u_int64_t    flags, ncpu;
  53.     glibtop_entry    cpuinfo [GLIBTOP_NCPU];
  54. };
  55.  
  56. #define glibtop_get_sysinfo()    glibtop_get_sysinfo_s(glibtop_global_server)
  57.  
  58. #define glibtop_get_sysinfo_r    glibtop_get_sysinfo_s
  59.  
  60. glibtop_sysinfo *glibtop_get_sysinfo_s (glibtop *server);
  61.  
  62. END_LIBGTOP_DECLS
  63.  
  64. #endif
  65.